import React from 'react'
import PropTypes from 'prop-types';
import ArrowBackIosNew from '@mui/icons-material/ArrowBackIosNew';
import style from './index.module.scss';
import Paper from '@mui/material/Paper';

HeadNav.propTypes = {
    leftClick: PropTypes.func,
    title: PropTypes.string,
    isShadow: PropTypes.bool,
    borderRadius: PropTypes.string,
    fontSize: PropTypes.string
}

HeadNav.defaultProps = {
    title: '用户设置',
    isShadow: false,
    borderRadius: '5px',
    fontSize: '16px'
}

export default function HeadNav(props) {
    const { title, leftClick } = props;
    let styleData = {
        boxShadow: 'none',
        borderRadius: '5px',
        fontSize: '16px'
    }
    return (
        <>
            <Paper className={style.nav} style={styleData}>
                <div className={style.nav_left} onClick={leftClick}>
                    <ArrowBackIosNew sx={{ fontSize: 18}}></ArrowBackIosNew>
                </div>
                <div className={style.nav_title}>
                    {title}
                </div>
            </Paper>
        </>
    )
}
